# Maintainer: Jelle van der Waa <jelle@archlinux.org>

_name=ifaddr
pkgname=python-ifaddr
pkgver=0.2.0
pkgrel=2
pkgdesc="Enumerates all IP addresses on all network adapters of the system"
arch=('any')
url="https://github.com/pydron/ifaddr"
license=('MIT')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-nose' 'python-pytest' 'python-netifaces')
source=(https://github.com/pydron/ifaddr/archive/${pkgver}.tar.gz)
sha512sums=('47d26932ecf1aabbbecc738ac0d9a6d276f3e3131650b76896553db3f17392916357d31991d7098ff3efa1cb6bec20a41848be03221d179c2f454f94a39cb587')

build() {
  cd "${_name}-${pkgver}"
  python3 setup.py build
}

package() {
  cd "${_name}-${pkgver}"

  python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
  install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE

}

check() {
  cd "${_name}-${pkgver}"
  nosetests ${_name}/test_ifaddr.py
}

# vim:set ts=2 sw=2 et:
